+2006-12-29 Matthias Clasen <mclasen@redhat.com>
+
+ * gtk/gtk.symbols:
+ * gtk/gtkcelllayout.[hc] (gtk_cell_layout_get_cells):
+ New function to get the cell renderers of a cell layout.
+
+ * gtk/gtktreeviewcolumn.c:
+ * gtk/gtkcellview.c:
+ * gtk/gtkiconview.c: Implement get_cells.
+
2006-12-28 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkiconview.c: Use word wrapping by default, and
+2006-12-29 Matthias Clasen <mclasen@redhat.com>
+
+ * gtk/gtk-sections.txt: Add gtk_cell_layout_get_cells.
+
+ * gtk/gtk-docs.sgml: Add a "Since 2.12" index.
+
2006-12-22 Matthias Clasen <mclasen@redhat.com>
* gdk/gdk-sections.txt: Add new functions.
<index role="2.10">
<title>Index of new symbols in 2.10</title>
</index>
+ <index role="2.12">
+ <title>Index of new symbols in 2.12</title>
+ </index>
</book>
GtkCellLayoutDataFunc
gtk_cell_layout_pack_start
gtk_cell_layout_pack_end
+gtk_cell_layout_get_cells
gtk_cell_layout_reorder
gtk_cell_layout_clear
gtk_cell_layout_set_attributes
gtk_cell_layout_get_type G_GNUC_CONST
gtk_cell_layout_pack_end
gtk_cell_layout_pack_start
+gtk_cell_layout_get_cells
gtk_cell_layout_reorder
gtk_cell_layout_set_attributes G_GNUC_NULL_TERMINATED
gtk_cell_layout_set_cell_data_func
position);
}
+/**
+ * gtk_cell_layout_get_cells:
+ * @cell_layout: a #GtkCellLayout
+ *
+ * Returns the cell renderers which have been added to @cell_layout.
+ *
+ * Return value: a list of cell renderers. The list, but not the
+ * renderers has been newly allocated and should be freed with
+ * g_list_free() when no longer needed.
+ *
+ * Since: 2.12
+ */
+GList *
+gtk_cell_layout_get_cells (GtkCellLayout *cell_layout)
+{
+ GtkCellLayoutIface *iface;
+
+ g_return_val_if_fail (GTK_IS_CELL_LAYOUT (cell_layout), NULL);
+
+ iface = GTK_CELL_LAYOUT_GET_IFACE (cell_layout);
+ if (iface->get_cells)
+ return iface->get_cells (cell_layout);
+
+ return NULL;
+}
+
#define __GTK_CELL_LAYOUT_C__
#include "gtkaliasdef.c"
void (* reorder) (GtkCellLayout *cell_layout,
GtkCellRenderer *cell,
gint position);
+ GList* (* get_cells) (GtkCellLayout *cell_layout);
};
GType gtk_cell_layout_get_type (void) G_GNUC_CONST;
void gtk_cell_layout_pack_end (GtkCellLayout *cell_layout,
GtkCellRenderer *cell,
gboolean expand);
+GList *gtk_cell_layout_get_cells (GtkCellLayout *cell_layout);
void gtk_cell_layout_clear (GtkCellLayout *cell_layout);
void gtk_cell_layout_set_attributes (GtkCellLayout *cell_layout,
GtkCellRenderer *cell,
static void gtk_cell_view_cell_layout_reorder (GtkCellLayout *layout,
GtkCellRenderer *cell,
gint position);
-
+static GList * gtk_cell_view_cell_layout_get_cells (GtkCellLayout *layout);
#define GTK_CELL_VIEW_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GTK_TYPE_CELL_VIEW, GtkCellViewPrivate))
iface->set_cell_data_func = gtk_cell_view_cell_layout_set_cell_data_func;
iface->clear_attributes = gtk_cell_view_cell_layout_clear_attributes;
iface->reorder = gtk_cell_view_cell_layout_reorder;
+ iface->get_cells = gtk_cell_view_cell_layout_get_cells;
}
static void
return g_list_reverse (retval);
}
+static GList *
+gtk_cell_view_cell_layout_get_cells (GtkCellLayout *layout)
+{
+ return gtk_cell_view_get_cell_renderers (GTK_CELL_VIEW (layout));
+}
+
+
#define __GTK_CELL_VIEW_C__
#include "gtkaliasdef.c"
static void gtk_icon_view_cell_layout_reorder (GtkCellLayout *layout,
GtkCellRenderer *cell,
gint position);
+static GList * gtk_icon_view_cell_layout_get_cells (GtkCellLayout *layout);
+
static void gtk_icon_view_item_activate_cell (GtkIconView *icon_view,
GtkIconViewItem *item,
GtkIconViewCellInfo *cell_info,
iface->set_cell_data_func = gtk_icon_view_cell_layout_set_cell_data_func;
iface->clear_attributes = gtk_icon_view_cell_layout_clear_attributes;
iface->reorder = gtk_icon_view_cell_layout_reorder;
+ iface->get_cells = gtk_icon_view_cell_layout_get_cells;
}
static void
gtk_widget_queue_draw (GTK_WIDGET (icon_view));
}
+static GList *
+gtk_icon_view_cell_layout_get_cells (GtkCellLayout *layout)
+{
+ GtkIconView *icon_view = (GtkIconView *)layout;
+ GList *retval = NULL, *l;
+
+ for (l = icon_view->priv->cell_list; l; l = l->next)
+ {
+ GtkIconViewCellInfo *info = (GtkIconViewCellInfo *)l->data;
+
+ retval = g_list_prepend (retval, info->cell);
+ }
+
+ return g_list_reverse (retval);
+}
+
/* Public API */
static void gtk_tree_view_column_cell_layout_reorder (GtkCellLayout *cell_layout,
GtkCellRenderer *cell,
gint position);
+static GList *gtk_tree_view_column_cell_layout_get_cells (GtkCellLayout *cell_layout);
/* Button handling code */
static void gtk_tree_view_column_create_button (GtkTreeViewColumn *tree_column);
iface->set_cell_data_func = gtk_tree_view_column_cell_layout_set_cell_data_func;
iface->clear_attributes = gtk_tree_view_column_cell_layout_clear_attributes;
iface->reorder = gtk_tree_view_column_cell_layout_reorder;
+ iface->get_cells = gtk_tree_view_column_cell_layout_get_cells;
}
static void
return retval;
}
+static GList *
+gtk_tree_view_column_cell_layout_get_cells (GtkCellLayout *layout)
+{
+ return gtk_tree_view_column_get_cell_renderers (GTK_TREE_VIEW_COLUMN (layout));
+}
+
/**
* gtk_tree_view_column_add_attribute:
* @tree_column: A #GtkTreeViewColumn.